If additional areas got invalidated, don't try to add them to the paint
authorMatthias Clasen <matthiasc@src.gnome.org>
Mon, 2 Mar 2009 15:45:53 +0000 (15:45 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 2 Mar 2009 15:45:53 +0000 (15:45 +0000)
        * gtk/gtktextview.c (gtk_text_view_paint): If additional areas got
        invalidated, don't try to add them to the paint region: in an expose
        handler, we cannot paint outside the area that was passed in, since
        drawing will be clipped. So stealing the update region from the
        window causes lost draws.
        Patch by Owen Taylor

svn path=/trunk/; revision=22442

ChangeLog
gtk/gtktextview.c

index 1287e765c7fca85341af8a598e1f2998f3e5695f..5b35ed42ff01e77fe431530d39241898a0b32898 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-03-02  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 573688 – Don't steal update region in gtk_text_view_paint()
+
+       * gtk/gtktextview.c (gtk_text_view_paint): If additional areas got
+       invalidated, don't try to add them to the paint region: in an expose
+       handler, we cannot paint outside the area that was passed in, since
+       drawing will be clipped. So stealing the update region from the
+       window causes lost draws.
+       Patch by Owen Taylor
+
 2009-03-02  Alexander Larsson  <alexl@redhat.com>
 
        Bug 573087 – gdkwindow.c: {x,y}_offset used uninitialized
index da4f56273068c65f10839deed60b124f7ea63ab2..97e1433098cd63664b910c52c1290e968bb45427 100644 (file)
@@ -4531,7 +4531,6 @@ gtk_text_view_paint (GtkWidget      *widget,
   GtkTextView *text_view;
   GList *child_exposes;
   GList *tmp_list;
-  GdkRegion *updates;
   
   text_view = GTK_TEXT_VIEW (widget);
 
@@ -4546,19 +4545,6 @@ gtk_text_view_paint (GtkWidget      *widget,
       gtk_text_view_flush_first_validate (text_view);
     }
 
-  /* More regions could have become invalid in the above loop */
-  updates = gdk_window_get_update_area (text_view->text_window->bin_window);
-  if (updates)
-    {
-      GdkRectangle rect;
-      
-      gdk_region_get_clipbox (updates, &rect);
-
-      gdk_rectangle_union (area, &rect, area);
-      
-      gdk_region_destroy (updates);
-    }
-  
   if (!text_view->onscreen_validated)
     {
       g_warning (G_STRLOC ": somehow some text lines were modified or scrolling occurred since the last validation of lines on the screen - may be a text widget bug.");